import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import * as fs from 'fs';
import * as path from 'path';

async function bootstrap() {
  const app = await NestFactory.create(AppModule, {
    // httpsOptions: {
    //   key: fs.readFileSync(
    //     path.resolve(__dirname, '../public/cert/192.168.204.60-key.pem'),
    //   ),
    //   cert: fs.readFileSync(
    //     path.resolve(__dirname, '../public/cert/192.168.204.60.pem'),
    //   ),
    // },
  });
  app.enableCors();
  await app.listen(process.env.PORT ?? 3000);
}
bootstrap();
